package com.yang.design.create.factory.abstractFactory;

import lombok.Getter;

@Getter
public class Client {

    private TV tv;
    private Freezer freezer;

    public Client(ApplicationFactory factory) {
        this.tv = factory.createTV();
        this.freezer = factory.createFreezer();
    }

    public static void main(String[] args) {
        Client client = new Client(new HairFactory());
        Freezer freezer = client.getFreezer();
        freezer.use();
        TV tv = client.getTv();
        tv.show();
    }
}
